package com.twu.biblioteca;

public class ViewBookList extends MenuOption {

    private BookShelf bookShelf;

    public ViewBookList(String name, BookShelf bookShelf) {
        super(name);
        this.bookShelf = bookShelf;
    }

    @Override
    protected String menuOptionHeader() {
        return "ISBN\t\tBOOK TITLE\t\tAUTHOR\n";
    }

    @Override
    protected String menuOptionBody() {
        return bookShelf.getBookList();
    }

    @Override
    public String getResponse() {
        return String.format("%s %s %s",menuOptionHeader(),menuOptionBody(),menuOptionFooter());  //To change body of implemented methods use File | Settings | File Templates.
    }

    @Override
    protected boolean hasSubMenu() {
        return false;
    }
}
